<template>
  <div
    class="mirror"
    :style="!isIframe ? 'padding-top: 60px;' : ''"
    style="min-height: 100%; position: relative"
  >
    <Navigation v-if="!isIframe"></Navigation>

    <Top v-if="!isIframe"></Top>
    <Main></Main>
    <div class="footer" v-if="!isIframe">
      <div class="myContent">
        <span id="copyright">
          © 2024 贵州算家计算服务有限公司 &nbsp;&nbsp;
        </span>
        <span id="icpInfo" style="color: #fff">
          <a href="http://beian.miit.gov.cn/" target="_blank"
            >黔ICP备2022005134号-2</a
          >
          <a
            href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=52011102002831"
            target="_blank"
          >
            <img src="@/static/images/police.png" style="margin-top: 2px" />
            贵公网安备52011102002831号</a
          >
        </span>
      </div>
    </div>
  </div>
</template>

<script>
import Navigation from '@/components/navigator.vue'
import Top from '@/components/top.vue'
import Main from '@/components/main.vue'
export default {
  components: {
    Navigation,
    Top,
    Main,
  },
  data() {
    return { isIframe: false }
  },
  head() {
    return {
      title: '应用社区',
    }
  },
  created() {
    // console.log('this.$route :>> ', this.$route)
    if (this.$route.query.iframe) {
      this.isIframe = true
    }
  },
  methods: {},
}
</script>

<style scoped lang="scss">
.mirror {
  width: 100%;
  // padding-top: 60px;
  padding-bottom: 60px;
  background: rgba(247, 250, 248, 1);
  .mirror-main {
    display: flex;
    width: 1860px;
    margin: 25px;

    .left-content {
      width: 1407px;
      height: fit-content;

      .top {
        display: flex;
        justify-content: space-between;
        margin-bottom: 24px;

        .filter {
          display: flex;
          align-items: center;
          cursor: pointer;
          color: #222222;
          font-size: 16px;

          .new::after {
            content: '';
            display: inline-block;
            background: #222222;
            width: 2px;
            height: 10px;
            margin: 0 8px;
          }

          .active {
            color: #0776f9;
          }
        }

        .search {
          width: 200px;
          display: flex;
          justify-content: space-between;

          .el-input {
            width: 200px;
            border-color: #e5e5e5;
          }

          ::v-deep .el-input--medium .el-input__inner {
            height: 24px;
          }

          ::v-deep .el-input--medium .el-input__suffix {
            margin-top: -5px;
          }

          ::v-deep .el-input__inner::placeholder {
            color: #a6a6a6;
            font-size: 12px;
          }
        }
      }

      .mirror-list {
        display: grid;
        grid-template-columns: repeat(3, 32.22%);
        justify-content: space-between;
        grid-row-gap: 24px;
        grid-column-gap: 24px;

        .mirror-item {
          height: 374px;
          background-color: #fff;
          padding: 24px;
          border: 1px solid #ccc;
          border-radius: 2px;
          display: flex;
          flex-direction: column;
          cursor: pointer;

          .pic {
            padding: 0px;
            width: 100%;
            height: 202px;
            background-color: #f5faff;
            text-align: center;

            img {
              width: 100%;
              height: 100%;
              // transform: scale(1.2);
              // overflow: hidden !important;
            }
          }

          .content {
            display: flex;
            flex-direction: column;
            margin-top: 24px;

            .title {
              display: flex;
              align-items: center;

              span {
                &:first-child {
                  width: 24px;
                  height: 24px;
                  background-color: #deedff;
                  color: #0776f9;
                  font-weight: 700;
                  text-align: center;
                  line-height: 25px;
                  border-radius: 10px;
                  font-size: 16px;
                }

                &:nth-child(n + 2) {
                  margin-left: 10px;
                }
              }

              ::v-deep .el-tag--warning {
                background-color: #fff5eb;
                border-color: #ff8d1a;
                color: #ff8d1a;
              }

              ::v-deep .el-tag--success {
                background-color: #f2fff6;
                border-color: #36cc61;
                color: #36cc61;
              }
            }

            .name {
              color: #222222;
              font-weight: 400;
              font-size: 14px;
              margin-top: 10px;
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
              -o-text-overflow: ellipsis;
            }

            .desc {
              margin-top: 10px;
              font-size: 14px;
              color: #817e7e;
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
              -o-text-overflow: ellipsis;
            }
          }

          .tag {
            display: flex;
            justify-content: space-between;
            align-items: centers;
            margin-top: 20px;
            font-size: 12px;

            .use {
              display: flex;
              align-items: center;
              color: #817e7e;

              span {
                margin-left: 5px;
              }
            }

            .upUser {
              font-size: 12px;
              font-weight: 400;
              color: rgba(0, 0, 0, 0.65);
              line-height: 24px;
              // margin-top: 10px;
            }
          }

          // &:hover {
          //   box-shadow: 0 2px 10px 1px rgba($color: #0776f9, $alpha: 0.2);
          //   border: none;
          // }
        }
      }

      .no-content {
        width: 100%;
        height: 200px;
        border: 1px solid #ccc;
        border-radius: 5px;
        text-align: center;
        line-height: 200px;
      }

      .pagination {
        margin-top: 40px;
        display: flex;
        justify-content: flex-end;
      }
    }

    .right-content {
      width: 442px;
      height: 840px;
      display: flex;
      flex-direction: column;
      margin-left: 23px;

      .title {
        width: 100%;
        display: flex;
        align-items: center;
        margin-bottom: 27px;

        span {
          margin-left: 5px;
        }
      }

      .hotImage-list {
        width: 100%;
        height: fit-content;
        border: 1px solid #ccc;
        border-radius: 2px;
        display: flex;
        flex-direction: column;

        .hotImage-item {
          width: 100%;
          display: flex;
          height: 90px;
          padding: 20px 24px;
          border-radius: 2px;

          align-items: center;
          cursor: pointer;
          justify-content: flex-start;

          &:hover {
            background: #f8fafe;
          }

          .number {
            background-color: #eee;
            color: rgba($color: #000000, $alpha: 0.4);
            border-radius: 2px;
            font-size: 16px;
            // color: #0776f9;
            span {
              display: block;
              width: 20px;
              height: 20px;
              text-align: center;
              line-height: 22px;
              font-weight: 700;
              // color: #808080;
            }
          }

          .avatar {
            color: #fff;
            border-radius: 2px;
            div {
              width: 50px;
              height: 50px;
              font-weight: 700;
              text-align: center;
              line-height: 50px;
              margin-left: 10px;
              font-size: 20px;
              background-image: url('@/static/images/tool_bg.png');
            }
          }

          .hotImage-content {
            width: 320px;
            height: 50px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            margin-left: 8px;

            .hotImage-name {
              font-size: 14px;
              font-weight: 400;
              color: #222;
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
              -o-text-overflow: ellipsis;
            }

            .tag {
              display: flex;
              justify-content: space-between;
              align-items: center;
              font-size: 12px;
              color: #817e7e;

              .upUser {
                margin-top: 6px;
                color: rgba($color: #000000, $alpha: 0.65);
                font-size: 12px;
              }

              .use {
                display: flex;
                align-items: center;
                color: rgba($color: #000000, $alpha: 0.65);
                font-size: 12px;

                span {
                  margin-top: 5px;
                }
              }
            }
          }
        }
      }
    }
  }

  .footer {
    width: 100%;
    height: 50px;
    background-color: rgba($color: #3fb549, $alpha: 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    // position: fixed;
    bottom: 0;
    .myContent {
      color: white !important;
      font-size: 14px;
      text-align: center;
      #icpInfo {
        display: inline-block;
        margin-left: 5px;
        a {
          color: #fff;
          font-size: 13px;
        }
      }
    }
    img {
      width: 15px;
      height: 15px;
      margin-left: 4px;
    }

    a {
      text-decoration: none;
    }
    a:hover {
      color: #ccc !important;
    }
  }
}

@media screen and (max-width: 1800px) {
  .mirror {
    width: 100%;

    .mirror-main {
      width: 100%;
      margin: 32px 4%;

      .left-content {
        width: 66%;

        .mirror-list {
          grid-template-columns: repeat(2, 49%);
          grid-row-gap: 20px;

          .mirror-item {
            width: 100%;
          }
        }
      }

      .right-content {
        width: 25%;

        .hotImage-list {
          .hotImage-item {
            .number {
              span {
                width: 20px;
                height: 20px;
              }
            }

            .avatar {
              span {
                width: 35px;
                height: 35px;
                line-height: 36px;
              }
            }

            .hotImage-content {
              width: 60%;
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 1050px) {
  .mirror {
    width: 100%;

    .mirror-main {
      width: 100%;
      margin: 32px 40px;

      .left-content {
        width: 60%;

        .mirror-list {
          grid-template-columns: repeat(1, 100%);
        }
      }

      .right-content {
        width: 30%;

        .hotImage-list {
          .hotImage-item {
            .number {
              span {
                width: 20px;
                height: 20px;
              }
            }

            .avatar {
              span {
                width: 35px;
                height: 35px;
                line-height: 36px;
              }
            }

            .hotImage-content {
              width: 68%;
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 820px) {
  .mirror {
    width: 100%;

    .mirror-main {
      width: 100%;
      margin: 32px 40px;

      .left-content {
        .searchTips {
          display: none;
        }
      }

      .right-content {
        .hotImage-list {
          .hotImage-item {
            .hotImage-content {
              width: 68%;

              .tag {
                justify-content: center;

                .upUser {
                  display: none;
                }
              }
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 560px) {
  .mirror {
    width: 100%;

    .mirror-main {
      width: 100%;

      .left-content {
        min-width: 320px;

        .top {
          .search {
            display: none;
          }
        }
      }
    }
  }
}
</style>
